@import "@/assets/css/common.scss";
.msearch {
  @include background_color("background_color");
  @include font_color("text-color");
  width: 100%;
  height: 100%;
  background: #f1f1f1;
  z-index: 88;
  bottom: 0;
  right: 0;
  position: fixed;
  padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  .msearch-top {
    position: sticky;
    top: 0;
    @include background_color("background_color");
    @include font_color("text-color");
    z-index: 100;
    padding: 0.25rem 0.25rem 0.1rem 0.25rem;
  }
  &-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.25rem;
    font-size: 0.32rem;

    &-box {
      flex: 1;
      height: 0.8rem;
      position: relative;
      .icon-sousuo {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        vertical-align: middle;
        color: #909399;
        font-size: 0.36rem;
      }
      .icon-shanchu2 {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        vertical-align: middle;
        color: #909399;
        font-size: 0.36rem;
      }
    }
    &-input {
      width: 100%;
      height: 100%;
      @include background_color("secondary-bg");
      @include font_color("text-color");
      border: none;
      border-radius: 99rem;
      padding: 0.2rem 0.7rem;
      font-size: 0.34rem;
      &:focus {
        border: none;
        border-color: red;
        outline: none;
      }
    }
    &-back {
      font-size: 0.6rem;
      padding-right: 0.25rem;
      color: #4d4d4d;
    }
  }
  &-nav {
    font-size: 0.36rem;
    position: relative;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    &-box {
      width: 100%;
      display: flex;
      white-space: nowrap;
      align-items: center;
      padding-bottom: 0.15rem;
    }
    &::-webkit-scrollbar {
      display: none;
    }
    &-item {
      // display: inline-block;
      margin: 0 0.35rem;
      padding-bottom: 0.1rem;
      box-sizing: border-box;
      position: relative;
      text-align: center;
      width: fit-content;
      color: #909399;
      &:nth-child(1) {
        margin-left: 0.15rem;
      }
      &:last-child {
        margin-right: 0.15rem;
      }

      // &::after {
      //   content: "";
      //   position: absolute;
      //   bottom: 0;
      //   left: 100%;
      //   width: 0;
      //   height: 2px;
      //   background-color: #000;
      //   transition: all 0.3s ease-out;
      // }
    }
    &-active {
      font-weight: 600;
      @include font_color("text-color");
      // &::after {
      //   width: 100%;
      //   left: 0;
      // }

      // & + .nav::after {
      //   left: 0;
      // }
    }
    &-underline {
      position: absolute;
      bottom: 0;
      display: block;
      height: 4px;
      border-radius: 4px;
      background-color: red;
      transition: all 0.3s ease-out;
      margin-bottom: 0.1rem;
    }
  }
  &-body {
    height: calc(100% - 2.5rem);
    font-size: 0.36rem;
    overflow: hidden;
    // overflow-y: auto;

    &-track {
      position: relative;
      display: flex;
      width: 100%;
      height: 100%;
      will-change: left;
    }
    .swiper-slide {
      width: 100%;
      height: calc(100% - 1rem);
      // padding: 0 0.25rem;
      overflow-y: auto;
      // .tst {
      //   height: calc(100% - 5rem);
      //   overflow-y: auto;
      // }
      // .sdasa {
      //   height: 8rem;
      //   overflow-y: auto;
      // }
    }
  }
}
